package com.wxtt.android.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * 说明：视频对象
 * <p/>
 * 作者：fanly
 * <p/>
 * 时间：2016/2/21 17:49
 * <p/>
 * 版本：verson 1.0
 */
public class VideoBean extends Model {
    //视频唯一ID
    private String id;
    //视频标题
    private String title;
    //视频播放链接
    private String link;
    //视频截图
    private String thumbnail;
    //视频截图
    private String bigThumbnail;

    public String getBigThumbnail() {
        return bigThumbnail;
    }

    public void setBigThumbnail(String bigThumbnail) {
        this.bigThumbnail = bigThumbnail;
    }

    //视频时长
    private String duration;
    //视频分类
    private String category;
    //视频标签
    private String tags;
    //视频状态
    private String state;
    //总播放数
    private int view_count;
    //总收藏数
    private int favorite_count;
    //总评论数
    private int comment_count;
    //总顶数
    private int up_count;
    //总踩数
    private int down_count;
    //发布时间
    private String published;
    //
    private String public_type;
    private String paid;

    private User user;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public int getView_count() {
        return view_count;
    }

    public void setView_count(int view_count) {
        this.view_count = view_count;
    }

    public int getFavorite_count() {
        return favorite_count;
    }

    public void setFavorite_count(int favorite_count) {
        this.favorite_count = favorite_count;
    }

    public int getComment_count() {
        return comment_count;
    }

    public void setComment_count(int comment_count) {
        this.comment_count = comment_count;
    }

    public int getUp_count() {
        return up_count;
    }

    public void setUp_count(int up_count) {
        this.up_count = up_count;
    }

    public int getDown_count() {
        return down_count;
    }

    public void setDown_count(int down_count) {
        this.down_count = down_count;
    }

    public String getPublished() {
        return published;
    }

    public void setPublished(String published) {
        this.published = published;
    }

    public String getPublic_type() {
        return public_type;
    }

    public void setPublic_type(String public_type) {
        this.public_type = public_type;
    }

    public String getPaid() {
        return paid;
    }

    public void setPaid(String paid) {
        this.paid = paid;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public class User implements Serializable{
        private int id;
        private String name;
        private String link;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.title);
        dest.writeString(this.link);
        dest.writeString(this.thumbnail);
        dest.writeString(this.duration);
        dest.writeString(this.category);
        dest.writeString(this.tags);
        dest.writeString(this.state);
        dest.writeInt(this.view_count);
        dest.writeInt(this.favorite_count);
        dest.writeInt(this.comment_count);
        dest.writeInt(this.up_count);
        dest.writeInt(this.down_count);
        dest.writeString(this.published);
        dest.writeString(this.public_type);
        dest.writeString(this.paid);
        dest.writeSerializable(this.user);
    }

    public VideoBean() {
    }

    protected VideoBean(Parcel in) {
        this.id = in.readString();
        this.title = in.readString();
        this.link = in.readString();
        this.thumbnail = in.readString();
        this.duration = in.readString();
        this.category = in.readString();
        this.tags = in.readString();
        this.state = in.readString();
        this.view_count = in.readInt();
        this.favorite_count = in.readInt();
        this.comment_count = in.readInt();
        this.up_count = in.readInt();
        this.down_count = in.readInt();
        this.published = in.readString();
        this.public_type = in.readString();
        this.paid = in.readString();
        this.user = (User)in.readSerializable();
    }

    public static final Parcelable.Creator<VideoBean> CREATOR = new Parcelable.Creator<VideoBean>() {
        public VideoBean createFromParcel(Parcel source) {
            return new VideoBean(source);
        }

        public VideoBean[] newArray(int size) {
            return new VideoBean[size];
        }
    };
}
